package com.app.medicalcontrol.fragment.User.child;

import android.os.Bundle;
import android.view.View;
import android.widget.TextView;
import com.app.medicalcontrol.R;
import com.app.medicalcontrol.basis.BasisFragment;
import com.app.medicalcontrol.bean.UserBean;
import butterknife.BindView;

public class UserInfoFragment extends BasisFragment{

    private UserBean userInfo;
    @BindView(R.id.tv_user_name)
    TextView mTvUserName;
    @BindView(R.id.tv_sex)
    TextView mTvSex;
    @BindView(R.id.tv_phone)
    TextView mTvPhone;
    @BindView(R.id.tv_address)
    TextView mTvAddress;


    @Override
    public void initViews() {
        super.initViews();
        setContentView(R.layout.fragment_user_info);

        setTitle(getString(R.string.user_info));

        setTitleRightButton(R.mipmap.top_icon_msg, new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                getMessageInfo(v);
            }
        });
    }

    @Override
    public void initData(Bundle savedInstanceState) {
        super.initData(savedInstanceState);
        userInfo =UserCenterFragment.userBean;
        mTvUserName.setText(""+userInfo.getNickname());
        mTvSex.setText(""+userInfo.getSexString());
        mTvPhone.setText(""+userInfo.getMobile());
        mTvAddress.setText(""+userInfo.getStore_name());

    }
}
